3.19.49 \(\int \frac {9+6 x+x^2}{x^2} \, dx\)

Optimal. Leaf size=11 \[ x-\frac {9}{x}+6 \log (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {14} \begin {gather*} x-\frac {9}{x}+6 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(9 + 6*x + x^2)/x^2,x]

[Out]

-9/x + x + 6*Log[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin {align*} \int \frac {9+6 x+x^2}{x^2} \, dx &=\int \left (1+\frac {9}{x^2}+\frac {6}{x}\right ) \, dx\\ &=-\frac {9}{x}+x+6 \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 11, normalized size = 1.00 \begin {gather*} x-\frac {9}{x}+6 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(9 + 6*x + x^2)/x^2,x]

[Out]

-9/x + x + 6*Log[x]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {9+6 x+x^2}{x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(9 + 6*x + x^2)/x^2,x]

[Out]

IntegrateAlgebraic[(9 + 6*x + x^2)/x^2, x]

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 14, normalized size = 1.27 \begin {gather*} \frac {x^{2} + 6 \, x \log \relax (x) - 9}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+6*x+9)/x^2,x, algorithm="fricas")

[Out]

(x^2 + 6*x*log(x) - 9)/x

________________________________________________________________________________________

giac [A]  time = 0.17, size = 12, normalized size = 1.09 \begin {gather*} x - \frac {9}{x} + 6 \, \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+6*x+9)/x^2,x, algorithm="giac")

[Out]

x - 9/x + 6*log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.07, size = 12, normalized size = 1.09 \begin {gather*} x +6 \ln \relax (x )-\frac {9}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+6*x+9)/x^2,x)

[Out]

-9/x+x+6*ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.80, size = 11, normalized size = 1.00 \begin {gather*} x - \frac {9}{x} + 6 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+6*x+9)/x^2,x, algorithm="maxima")

[Out]

x - 9/x + 6*log(x)

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 11, normalized size = 1.00 \begin {gather*} x+6\,\ln \relax (x)-\frac {9}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((6*x + x^2 + 9)/x^2,x)

[Out]

x + 6*log(x) - 9/x

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 8, normalized size = 0.73 \begin {gather*} x + 6 \log {\relax (x )} - \frac {9}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+6*x+9)/x**2,x)

[Out]

x + 6*log(x) - 9/x

________________________________________________________________________________________